module MetaData where

data ApplicationGen name = Application (Map name (DocumentTypeGen name))

data DocumentTypeGen name =
    ComplexType
        { documentTypeFields :: Map name (FieldTypeGen name)
        , documentTypeParent :: Maybe name
        , documentTypeUniqConstraints :: Set (Set name)
        }
    | BasicType BasicType

data BasicType = BTBool | BTInt | BTString | BTDouble
 
data FieldTypeGen name =
    ValueType Cardinality (DocumentTypeGen name)
    | ReferenceType Cardinality name

data Cardinality = Optional | Mandatory | Multiple
 
typeCheckMetaData :: Application name -> Bool
typeCheckMetaData = undefined

